#!/bin/bash

: ${DOCKER_USER:? required}

dep ensure -v
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o admission-webhook-example 
docker build --no-cache -t ${DOCKER_USER}/admission-webhook-example:v1 .
rm -rf admission-webhook-example

docker push ${DOCKER_USER}/admission-webhook-example:v1